﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/philadmin/Philadmin.Master"
    CodeBehind="EditTour.aspx.vb" Inherits="Phila.EditTour1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $('#ContentPlaceHolder1_btnUpdate').click(function () {
                //alert($('#ContentPlaceHolder1_cmbZones').val());
                var cid = $('#ContentPlaceHolder1_cmbCategory option').size();
                if (cid > 1) {
                    if ($('#ContentPlaceHolder1_cmbCategory').val() == 0) {
                        alert("Please select a Country");
                        $('#ContentPlaceHolder1_cmbCategory').focus();
                        return false;
                    }
                }
                var zid = $('#ContentPlaceHolder1_cmbZones option').size();
                if (zid > 1) {
                    if ($('#ContentPlaceHolder1_cmbZones').val() == 0) {
                        alert("Please select a Zone");
                        $('#ContentPlaceHolder1_cmbZones').focus();
                        return false;
                    }
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" cellpadding="2" cellspacing="2" align="center">
        <tr>
            <td>
                <h1>
                    Add/Edit Tours
                </h1>
                <fieldset>
                    <legend><b>Tour Details</b></legend>
                    <table width="98%" align="center" cellpadding="5" cellspacing="2">
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                                <asp:UpdatePanel ID="UpdatePanelHotel" runat="server">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td>
                                                    <strong>Countries</strong>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="cmbCategory" runat="server" AutoPostBack="True">
                                                    </asp:DropDownList>
                                                    <span class="red">*</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="185px">
                                                    <strong>Zones</strong>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="cmbZones" runat="server">
                                                    </asp:DropDownList>
                                                    <asp:Label ID="lblZone" runat="server"></asp:Label>
                                                    <asp:RequiredFieldValidator ID="reqCat" runat="server" ControlToValidate="cmbCategory"
                                                        ErrorMessage="&lt;br /&gt;Select Country" InitialValue="0" ValidationGroup="save"
                                                        Display="Dynamic" CssClass="red"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="cmbCategory" />
                                    </Triggers>
                                </asp:UpdatePanel>
                                <%--<asp:UpdateProgress ID="UpdateProgress" runat="Server" AssociatedUpdatePanelID="UpdatePanelHotel" DynamicLayout="true">
                                    <ProgressTemplate>
                                    Please wait...
                                    </ProgressTemplate>
                                </asp:UpdateProgress>--%>
                                <asp:UpdateProgress ID="UpdateProgress2" runat="server">
                                    <ProgressTemplate>
                                        <div class="loader"><img src="images/icons/loading-transparent.gif" valign="middle" /> Loading Zones. Please Wait...</div>
                                    </ProgressTemplate>
                                </asp:UpdateProgress>

                            </td>
                        </tr>
                        <%--<tr>
                            <td>
                                <strong>Categories</strong>
                            </td>
                            <td>
                                <asp:DropDownList ID="cmbCategory2" runat="server" AutoPostBack="true">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        
                        <asp:Panel ID="plZone" runat="server">
                            <tr>
                                <td>
                                    <strong>Zones</strong>
                                </td>
                                <td>
                                    <asp:DropDownList ID="cmbZones2" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </asp:Panel>--%>
                        <tr>
                            <td width="180px">
                                <b>Tour Code</b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtTourCode" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <b>Tour Name</b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtName" runat="server" MaxLength="500" Width="500px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqName" runat="server" ControlToValidate="txtName"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Enter Tour Name" Font-Bold="False"
                                    ValidationGroup="save" CssClass="red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>No.Of Days</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtDays" runat="server" MaxLength="2" Width="60px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqDays" runat="server" ControlToValidate="txtDays"
                                    Display="Dynamic" ErrorMessage="&lt;br/&gt;Enter No. Of Days" Font-Bold="False"
                                    ValidationGroup="save" CssClass="red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regDays" runat="server" ControlToValidate="txtDays"
                                    ErrorMessage="&lt;br /&gt;Enter only Numeric value" ValidationExpression="\d*[0-9]"
                                    ValidationGroup="save" Display="Dynamic" CssClass="red"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>No.Of Nights</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtNights" runat="server" MaxLength="2" Width="60px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqNights" runat="server" ControlToValidate="txtNights"
                                    Display="Dynamic" ErrorMessage="&lt;br/&gt;Enter No. Of Nights" Font-Bold="False"
                                    ValidationGroup="save" CssClass="red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regNights" runat="server" ControlToValidate="txtNights"
                                    ErrorMessage="&lt;br /&gt;Enter only Numeric value" ValidationExpression="\d*[0-9]"
                                    ValidationGroup="save" Display="Dynamic" CssClass="red"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Destinations</strong>
                            </td>
                            <td>
                                <%--<radE:RadEditor ID="radSummary" runat="server" Height="500px" Width="500px" ImagesPaths="~/Images"
                                    DeleteImagesPaths="~/Images" UploadImagesPaths="~/Images" UploadDocumentsPaths="~/Images"
                                    DeleteDocumentsPaths="~/Images" DocumentsPaths="~/Images" UploadFlashPaths="~/Images"
                                    DeleteFlashPaths="~/Images" FlashPaths="~/Images" UploadMediaPaths="~/Images"
                                    DeleteMediaPaths="~/Images" MediaPaths="~/Images" UploadTemplatePaths="~/Images"
                                    DeleteTemplatePaths="~/Images" TemplatePaths="~/Images" ShowSubmitCancelButtons="false">
                                </radE:RadEditor>
                                <cc1:Editor ID="txtSummary0" runat="server" Height="300px" Width="100%" />--%>
                                <asp:TextBox ID="txtSummary" runat="server" MaxLength="250" TextMode="MultiLine" Columns="80" Rows="5"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Description</strong>
                            </td>
                            <td>
                                <cc1:Editor ID="txtDescription" runat="server" Height="300px" Width="100%" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Tour Includes</strong>
                            </td>
                            <td>
                                <%-- <HTMLEditor:Editor ID="edInclude" runat="server" Height="300px" Width="100%" AutoFocus="false" /> --%>
                                <cc1:Editor ID="txtInclude" runat="server" Height="300px" Width="100%" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Tour Excludes</strong>
                            </td>
                            <td>
                                <%--<HTMLEditor:Editor ID="edExclude" runat="server" Height="300px" Width="100%" AutoFocus="false" />  --%>
                                <cc1:Editor ID="txtExclude" runat="server" Height="300px" Width="100%" />
                            </td>
                        </tr>
                        <%--
                        <tr>
                            <td>
                                <b>Cost</b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCost" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td>
                                <strong>Tour Cost</strong>
                            </td>
                            <td>
                                <radE:RadEditor ID="radCost" runat="server" Height="500px" Width="500px" ImagesPaths="~/Images"
                                    DeleteImagesPaths="~/Images" UploadImagesPaths="~/Images" UploadDocumentsPaths="~/Images"
                                    DeleteDocumentsPaths="~/Images" DocumentsPaths="~/Images" UploadFlashPaths="~/Images"
                                    DeleteFlashPaths="~/Images" FlashPaths="~/Images" UploadMediaPaths="~/Images"
                                    DeleteMediaPaths="~/Images" MediaPaths="~/Images" UploadTemplatePaths="~/Images"
                                    DeleteTemplatePaths="~/Images" TemplatePaths="~/Images" ShowSubmitCancelButtons="false">
                                </radE:RadEditor>
                            </td>
                        </tr>--%>
                        <tr>
                            <td>
                                <b>Type of Meal</b>
                            </td>
                            <td>
                                <%--<asp:CheckBoxList ID="chkMealType" runat="server" RepeatColumns="4" RepeatDirection="Horizontal">
                                        </asp:CheckBoxList>--%>
                                <asp:DropDownList ID="cmbMeal" runat="server">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqMeal" runat="server" ControlToValidate="cmbMeal"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Enter Meal" InitialValue="0" ValidationGroup="save"
                                    CssClass="red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Thumbnail</b>
                            </td>
                            <td>
                                <asp:FileUpload ID="fileUpload" runat="server" />
                                <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="ValidateFileUpload"
                                    ValidationGroup="icon" ErrorMessage="Only .jpg,.gif Files Accept" Text="*" ControlToValidate="fileUpload"
                                    Display="Dynamic" SetFocusOnError="true" CssClass="red"></asp:CustomValidator>
                                <asp:Literal ID="ltrImg" runat="server"></asp:Literal>
                            </td>
                        </tr>
                        <%--<tr visible="false">
                        <td>
                            <strong>Category</strong></td>
                        <td>
                            <asp:CheckBoxList ID="chkCategory" runat="server" RepeatDirection="Horizontal" RepeatColumns="4" Width="90%" CellSpacing="0" CellPadding="0"></asp:CheckBoxList>
                            </td>
                    </tr>--%>
                        <tr>
                            <td>
                                <strong>View Order</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtViewOrder" runat="server" MaxLength="10" Width="100px">0</asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqViewOrder" runat="server" Display="Dynamic" ErrorMessage="&lt;br /&gt;Enter View Order"
                                    ControlToValidate="txtViewOrder" CssClass="red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regVOrder" runat="server" ControlToValidate="txtVieworder"
                                    ErrorMessage="&lt;br /&gt;Enter only Numeric value" ValidationExpression="\d*[0-9]"
                                    ValidationGroup="save" Display="Dynamic" CssClass="red"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Map</strong>
                            </td>
                            <td>
                                <asp:FileUpload ID="fileMap" runat="server" />
                                <asp:CustomValidator ID="CustomValidator2" runat="server" ClientValidationFunction="ValidateFileUpload"
                                    ValidationGroup="icon" ErrorMessage="Only .jpg,.gif Files Accept" Text="*" ControlToValidate="fileMap"
                                    Display="Dynamic" SetFocusOnError="true" CssClass="red"></asp:CustomValidator>
                                <asp:Literal ID="ltrMap" runat="server"></asp:Literal>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>IsFeatured</strong>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkFeatured" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>IsPackage</strong>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkPackage" runat="server" Checked="True" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>IsCruise</strong>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkCruise" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>IsSafari</strong>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkSafari" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>IsShortBreak</b>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkShortBreak" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>IsActive</strong>
                            </td>
                            <td>
                                <asp:CheckBox ID="chkIsActive" runat="server" Checked="True" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <br />
                <br />
                <fieldset>
                    <legend><b>Meta Details</b></legend>
                    <table width="98%" align="center" cellpadding="2" cellspacing="2">
                        <tr>
                            <td width="180px">
                                <strong>Title</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMTitle" runat="server" MaxLength="500" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqMTitle" runat="server" ControlToValidate="txtMTitle"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Enter Page Title" ValidationGroup="save"
                                    CssClass="red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Keywords</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMKeywords" runat="server" MaxLength="500" Width="300px" Rows="5"
                                    TextMode="MultiLine"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqMKeywords" runat="server" ControlToValidate="txtMKeywords"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Enter Page Keywords" ValidationGroup="save"
                                    CssClass="red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Description</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMDescription" runat="server" MaxLength="500" Width="300px" Rows="5"
                                    TextMode="MultiLine"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="reqMDesc" runat="server" ControlToValidate="txtMDescription"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Enter Page Description" ValidationGroup="save"
                                    CssClass="red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <br />
                <br />
                <fieldset>
                    <table width="98%" cellpadding="2" cellspacing="2" align="center">
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Button ID="btnUpdate" runat="server" Text="Save" ValidationGroup="save" CssClass="form-button" />
                                <%--<asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="save" CssClass="form-button" />--%>&nbsp;&nbsp;
                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="form-button" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <br />
                <br />
            </td>
        </tr>
    </table>
</asp:Content>
